"""
URL configuration for djangoProject1 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

# urlpatterns = [
#     path('admin/', admin.site.urls),
# ]


from django.urls import path

from djangoProject1.views import create_item, list_items, update_item, delete_item, add, home, read, edit, dele

urlpatterns = [
    path('create-item/', create_item, name='create_item'),
    path('items/', list_items, name='list_items'),
    path('update-item/<int:pk>/', update_item, name='update_item'),
    path('delete-item/<int:pk>/', delete_item, name='delete_item'),
    path('home/', home, name='home'),  # 首页面
    path('read/', read, name='read'),  # 浏览信息
    path('add/', add, name='add'),  # 添加信息
    path('dele/<int:sid>/', dele, name='dele'),  # 删除信息
    path('edit/<int:sid>/', edit, name='edit'),  # 修改信息
]
